﻿<div class="container-fluid">
<?php
	session_start();

	extract($_POST);
	extract($_GET);
	unset($_POST,$_GET);
	if (isset($logout) && $logout == 1)
	{
		unset($_SESSION['user']);
		$_SESSION=array();
		unset($_SESSION);
		setcookie(session_name(),"",time()-1);
		echo "<script>alert(注销登录成功!!!');window.location='index.php';</script>";
	}
?>
	<nav class="navbar navbar-default" role="navigation">
		<div class="container-fluid">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse"
				data-target="#example-navbar-collapse">
			<span class="sr-only">切换导航</span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="index.php"><span class="glyphicon glyphicon-home"></span> 测试工程</a>
		</div>
		<div class="collapse navbar-collapse" id="example-navbar-collapse">
			<ul class="nav navbar-nav">
				<li><a href="issue_list.php"><span class="glyphicon glyphicon-question-sign"></span> 问题追踪</a></li>
				<li><a href="versionlist.php"><span class="glyphicon glyphicon-list-alt"></span> 版本管控</a></li>
				<li><a href="tewiki.php"><span class="glyphicon glyphicon-globe"></span> 工程维基</a></li>
				<li><a href="project.php"><span class="glyphicon glyphicon-exclamation-sign"></span> 专案漏失</a></li>
				<li><a href="repo_list.php"><span class="glyphicon glyphicon-shopping-cart"></span> 库存查询</a></li>
				<li class="dropdown">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">
						<span class="glyphicon glyphicon-search"></span> 资料查询
						<b class="caret"></b>
					</a>
					<ul class="dropdown-menu">
						<li><a href="getworkorder.php"><span class="glyphicon glyphicon-th-list"></span> MES工单</a></li>
						<li><a href="#" onclick="javascript:window.open('getbominfo.php','全部工单查询', 'height=800, width=780, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no');"><span class="glyphicon glyphicon-map-marker"></span> SAP工单</a></li>
						<li><a href="getconfig.php"><span class="glyphicon glyphicon-fire"></span> 配置查询</a></li>
						<li><a href="getpart.php"><span class="glyphicon glyphicon-eye-open"></span> 料号查询</a></li>
						<li class="divider"></li>
						<li><a href="msc_query.php"><span class="glyphicon glyphicon-magnet"></span> 硬件ID查询</a></li>
						<li><a href="wo_list.php"><span class="glyphicon glyphicon-flag"></span> 工单首件</a></li>
						<li><a href="#" onclick="javascript:window.open('Image_script.php','镜像脚本', 'height=800, width=780, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no');"><span class="glyphicon glyphicon-italic"></span> 镜像脚本</a></li>
						<li class="divider"></li>
						<li><a href="#" onclick="javascript:window.open('/admin/hwchangelist.php','HW变更记录', 'height=800, width=1400, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no');"><span class="glyphicon glyphicon-retweet"></span> 硬件变更记录</a></li>

					</ul>
				</li>
			</ul>
			<ul class="nav navbar-nav navbar-right"> 
			<?
				if($_SESSION['user']==1){
					if($_SESSION['logname'] == "Admin")
						echo '<li><a href="admin/admin_index.php?name=users"> '.$_SESSION['logname'].'</a></li>.|.<a href="admin/admin_top.php?logout=1"> 注销</a>';
					else
						echo '<li><a href="admin/userinfo.php?id='.$_SESSION['ID'].'"><span class="glyphicon glyphicon-user"></span> '.$_SESSION['logchnname'].'</a></li><li><a href="admin/admin_top.php?logout=1"><span class="glyphicon glyphicon-log-out"></span> 注销</a></li>';
				}else
					echo '<li><a href="admin/userinfo.php"><span class="glyphicon glyphicon-log-in"></span> 登录</a></li>';
			?>
			</ul>
		</div>	
		</div>	
	</nav>
</div>

